package org.wak.main
{
	/**
	 * Collects the settings data from XML. 
	 * 
	 */	
	public class XMLAdventureSettings implements IAdventureSettings
	{
		// Input xml settings
		private var mXMLSettings:XML ;
		
		// player Starting scene id. 
		private var mStartingSceneId:String = "";
		
		// adventure style
		private var mAdventureStyle:String = "";
		
		// default player character.
		private var mDefaultPlayerCharacterId:String = "" ;
		
		private var mDefaultLanguage:String = "" ;
		
		private var mUseCustomCursors:Boolean = true ;
		
		
		/**
		 * Constructor 
		 * @param pXML xml data collected from a Settings xml.
		 * 
		 */		
		public function XMLAdventureSettings(pXML:XML)
		{
			mXMLSettings = pXML ;
			mStartingSceneId = mXMLSettings.StartingScene ;
			mAdventureStyle = mXMLSettings.AdventureStyle ;
			mDefaultPlayerCharacterId = mXMLSettings.DefaultPlayerCharacter ; 
			mDefaultLanguage = mXMLSettings.DefaultLanguage ;
			mUseCustomCursors = mXMLSettings.UseCustomMouseCursors == "true"? true: false ;
			//trace("mStartingSceneId:"+mStartingSceneId);
		}
		
		
		/**
		 * @inheritDoc 
		 */		
		public function GetPlayerStartingRoom():String
		{
			return mStartingSceneId;
		}
		
		/**
		 * @inheritDoc 
		 */	
		public function GetAdventureStyle():String 
		{
			return mAdventureStyle ;
		}
		
		/**
		 * @inheritDoc 
		 */	
		public function GetAdventureDefaultCharacterId():String
		{
			return mDefaultPlayerCharacterId ;
		}
		
		/**
		 * @inheritDoc 
		 */	
		public function GetDefaultLanguage():String 
		{
			return mDefaultLanguage ;
		}
		
		/**
		 * @inheritDoc 
		 */	
		public function get useCustomCursors():Boolean 
		{
			return mUseCustomCursors ;
		}
	}
}